package com.todo.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 *
 * </p>
 *
 * @author CAROL
 * @since 2023-9-5
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("u_base_info")
public class User implements Serializable {

    /**
     * 0：离线，1：在线，2：隐身，3：忙碌
     */
    public static final int USER_STATUS_OUTLINE = 0;
    public static final int USER_STATUS_ONLINE = 1;
    public static final int USER_STATUS_HIDING = 2;
    public static final int USER_STATUS_BUSY = 3;

    private static final long serialVersionUID = 1L;


    /**
     * 10位uid
     */
    @TableId(value = "uid")
    private String uid;

    /**
     * 手机号码
     */
    private String uPhone;

    /**
     * 密码，加密存储
     */
    private String uPassword;

    /**
     * 昵称，默认是随机字符
     */
    private String uName;

    /**
     * 用户头像
     */
    private String uIcon = "";

    /**
     * 创建时间
     */
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    private LocalDateTime updateTime;

    /**
     * 用户在线状态
     */
    private int uStatus;


}
